<template>

    <van-swipe :autoplay="3000" lazy-render>
        <van-swipe-item v-for="(v, i) in images" :key="i">
            <img :src="v.image_src" />
        </van-swipe-item>
    </van-swipe>

</template>

<script setup>
import { swiperdataApi } from '@/api/api';
import { ref } from 'vue';
let query = ref('')
let images = ref([])
const getimg = () => {
    swiperdataApi(query.value).then((res) => {
        console.log(res);
        images.value = res.data.message
    })
}
getimg()
</script>

<style lang="scss" scoped>
.van-swipe,
.van-swipe-item,
img {
    width: 100%;
    height: 20rem;
}
</style>